package com.start_eternity.oasissafewalk.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Driver {
    private Integer driverId;
    private String driverName;
    private Short gender;
    private String phone;//电话
    private String driverLicense;//驾驶证
    private String urgent;//紧急联系人
    private String urgentPhone;
    private Short status;//在职状态
    private String cardFront;//身份证正面
    private String cardBack;//身份证背面
    private LocalDate entryTime;//入职日期
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;//修改日期
    private LocalDate deleteTime;//离职日期
    private Integer carId;//外键车辆id
    private String openId;//微信用户的openId
    private List<DriverOrder> driverOrderList;//在这种一对多的关系中，一个司机可以处理多个订单，而一个订单通常只与一个司机相关联。
    private List<Message> messages;
}
